{{ template "head" . }}

<h1>Performance deep dive</h1>
{{ template "prom_right_table_head" }}
<tr>
  <th>Validators</th>
  <th>{{ template "prom_query_drilldown" (args "sum(up{job='validators'})") }} / {{ template "prom_query_drilldown" (args "count(up{job='validators'})") }}</th>
</tr>
{{ template "prom_right_table_tail" }}

{{ template "prom_content_head" . }}

<h2>Validators</h2>
{{ template "validators_table" }}

<h2>High level values</h2>
<table style="width: 90%;" cellpadding="10px">
  <tr>
    {{ template "graph_in_table" (args "lastCommittedRound" "Avg e2e latency (ms)" "irate(mempool_duration_sum{op='e2e.latency'}[1m])/irate(mempool_duration_count{op='e2e.latency'}[1m])" "blocks per sec") }}

    {{ template "graph_in_table" (args "lastCommittedVersion" "Committed successful txns per sec" "irate(consensus_gauge{op='last_committed_version'}[1m])" "txns per sec") }}

    {{ template "graph_in_table" (args "numTxnsPerBlock" "Avg num txns per block" "irate(consensus_duration_sum{op='num_txns_per_block'}[1m])/irate(consensus_duration_count{op='num_txns_per_block'}[1m])" "txns per block") }}
  </tr>
</table>

<h2>Storage and execution</h2>
<table style="width: 90%;" cellpadding="10px">
  <tr>
    {{ template "graph_in_table" (args "txnExecutionTime" "Avg txn execution time (ms)" "irate(consensus_duration_sum{op='txn_execution_duration_ms'}[1m])/irate(consensus_duration_count{op='txn_execution_duration_ms'}[1m])" "ms") }}

    {{ template "graph_in_table" (args "blockExecutionTime" "Avg block execution time (ms)" "irate(consensus_duration_sum{op='block_execution_duration_ms'}[1m])/irate(consensus_duration_count{op='block_execution_duration_ms'}[1m])" "ms") }}

    {{ template "graph_in_table" (args "blockCommitTime" "Avg commit (store) time (ms)" "irate(consensus_duration_sum{op='block_commit_duration_ms'}[1m])/irate(consensus_duration_count{op='block_commit_duration_ms'}[1m])" "ms") }}
  </tr>
</table>

<h2>AC and Mempool</h2>
<table style="width: 90%;" cellpadding="10px">
  <tr>
    {{ template "graph_in_table" (args "preConsensusTime" "Avg time spent before consensus (ms)" "irate(consensus_duration_sum{op='txn_pre_consensus_ms'}[1m])/irate(consensus_duration_count{op='txn_pre_consensus_ms'}[1m])" "ms") }}
  </tr>
</table>

<h2>Consensus counters</h2>
<table style="width: 90%;" cellpadding="10px">
  <tr>
    {{ template "graph_in_table" (args "creationToCommit" "Avg time since block creation to commit (ms)" "irate(consensus_duration_sum{op='creation_to_commit_ms'}[1m])/irate(consensus_duration_count{op='creation_to_commit_ms'}[1m])" "ms") }}

    {{ template "graph_in_table" (args "creationToQC" "Avg time since block creation to QC (ms)" "irate(consensus_duration_sum{op='creation_to_qc_ms'}[1m])/irate(consensus_duration_count{op='creation_to_qc_ms'}[1m])" "ms") }}
  </tr>
</table>


{{ template "prom_content_tail" . }}

{{ template "tail" }}
